const net = require('net');

const client = net.createConnection({ port: 9808 }, () => {
  //'connect' listener
  console.log('connected to server!');

  const bufhd = new Buffer.allocUnsafe(4);
  const str = "admin";
  const strbuf = Buffer(str, "utf8");
  bufhd.writeInt32LE(strbuf.length, 0);
  const pk = Buffer.concat([bufhd, strbuf], bufhd.length + strbuf.length);

 // setInterval(()=>{
  console.log(pk);
  client.write(Buffer.concat([pk,bufhd],pk.length+bufhd.length));

setTimeout(() => {
console.log('==sql');
client.write(strbuf);
},3000)
 // }, 1000);
});
